This invention relates to an image coding system, an image decoding system, an image processing system, an image coding method, an image decoding method, and an image processing method.
In recent years, a digital copier for reading an original image through an image input unit such as a scanner, digitally processing image data output from the image input unit, and outputting the resultant data from an image output unit such as a printer, thereby providing a hard copy of the original has been finding spreading use. The digital copier must always have an electronic RDH function and an electronic sorter function of storing a number of pieces of image data in the copier and executing original sorting, filing, and page editing. To provide the functions, a data storage unit such as memory or hard disk is installed in the copier and image data is stored in the data storage unit and is output as required.
By the way, to store a large amount of image data, the storage capacity of the data storage unit need to be increased, but the scale and costs of the data storage unit also grow with an increase in the storage capacity. To avoid this problem, various methods of coding and storing image data are proposed. The coding methods enable a large amount of image data to be stored in a data storage unit of a small storage capacity.
A laser beam printer using a laser beam is available as an image output unit. Generally, a page description language is used for a control method of image output to a laser beam printer. That is, a host computer to which a laser beam printer is connected does not transfer the output contents to the printer as a bit map image (raster image) and transfers the contents of the page description language describing the text information and image information of the output contents to the printer.
On the other hand, the printer receives the page description language, interprets the language contents, expands page image data as a bit map image (raster image), and transfers the image onto paper, then outputs. To realize this capability, the printer must have a function of interpreting the contents of the page description language and memory for retaining a bit map image into which image data is expanded.
Assuming that image output resolution is 400 dpi and that the number of gray levels is 256 for a monochrome printer for outputting an a4-size image, for example, a 32-Mbyte capacity becomes necessary as the capacity of the memory. Further, for a color printer, four-color output of Y, M, C, and K becomes necessary and the memory capacity becomes four times (128 Mbytes). Installation of such large-capacity memory in the printer leads to an increase in the scale and costs of the printer.
Further, in recent years, the demand for high-resolution output has been made to provide an output image with high quality. To realize high-resolution image output ranging from 600 dpi to 2400 dpi, the memory capacity of a printer also increases exceptionally. For example, although a memory capacity of 128 Mbytes is required for YMCK 400 dpi, a memory capacity of 288 Mbytes is required for 600 dpi and an enormous memory capacity of 4608 Mbytes is required for 2400 dpi; it becomes impractical in both costs and circuit scale.
To avoid this problem, a method of coding and retaining image data in memory for reducing the memory capacity is possible. This method enables a large amount of image data to be retained in a small capacity.
To code image data for reducing the data capacity, it is possible to reduce the number of gray levels of reproducing an image and store the image in binary form. However, if the number of gray levels of reproducing is reduced, the quality of the finally provided image output is degraded. Thus, to store a high-quality image, it is desirable to store the image in multivalued form rather than in the binary form. A large number of methods of coding multivalued image data are available.
By the way, a text area and a photo area often are mixed in one sheet of an original output on a digital copier or a printer. Also, a computer-prepared image, namely, so-called computer graphics (CG) image and a natural image such as a photo, etc., read through a scanner often are mixed in a printer output image. The CG and natural images have entirely different image characteristics.
For example, a CG image area is constant in pixel value change and contains a flat background area with no pixel value change as a large part. Further, the CG image area also contains a text area containing only binary values of monochrome, a gradation area in which pixel values change violently, and the like. In contrast, a natural image area often contains noise when it is read through a scanner; pixel values often change finely even in an area which seems to be flat, such as an image background or blank.
Since the CG image and natural image areas have different image characteristics, optimum coding processing for each image quality characteristic needs to be performed to code the image data of mixed image with high quality and efficiently. To meet such demand, for image data with mixed areas having different image characteristics, optimum coding processing needs to be selected and performed for each area in response to the image data. A large number of such coding techniques are proposed as adaptive image coding technique, multi-mode coding technique (refer to the Unexamined Japanese Patent Application Publication No. Hei 6-326875, for example).
The CG image area often contains an image requiring a high resolution, such as a text or a line drawing, and further contains a gradation area having uniform pixel value change, an area in which pixel values having regular arrangement are continuous (for example, hatching, halftone, etc.,), and the like. Thus, generally, a coding technique not degrading the quality of a decoded image is desired for the CG image area. For example, a reversible coding technique of MMR (Modified Modified Read), LZW (Lempel-Ziv-Welch), JBIG (Joint Bi-level Image Group), etc., is applied.
Since the natural image area often contains an image requiring the gradation data rather than resolution data, such as a photo, a coding technique suppressing gradation data degradation is desired. If the reversible coding technique suppressing image degradation after decoding is applied to the natural image area, pixel values change violently and entropy is high in the natural image area, thus efficient coding cannot be accomplished in the reversible coding technique. Then, an irreversible coding technique is applied to the natural image area; an irreversible coding technique capable of retaining gradation data after decoding is appropriate. For example, ADCT (Adaptive Discrete Cosine Transform), etc., typified by JPEG (Joint Photographic Experts Group) baseline technique adopted as a color fax standard coding technique is applied.
In the multimode coding technique for selectively applying an optimum coding technique for each area of an image with mixed CG image and natural image areas, hitherto, reversible coding has been applied to the CG image area to prevent image quality degradation in the CG image area. In the reversible coding technique, the essential information amount of the image to be coded (entropy amount) is also retained after coding, the coding ratio greatly changes with the essential information amount, and the code amount after coding also greatly changes with the essential information amount. That is, a simple image results in a small code amount; a complicated image results in an enormous code amount.
Since the reversible coding technique retains the essential information, the image data before coding completely matches that after coding. If the essential information amount is very large, the coding ratio in reversible coding becomes 1/1 at the worst and the maximum code amount also becomes the same data amount as the original image. That is, there is a possibility in the reversible coding that coding will be unable to be executed and the data amount will not be decreased depending on the image to be coded.
Thus, to realize the multimode coding of applying the reversible coding to the CG image area, the code data memory capacity for retaining data requires the same capacity as the original image. In the multimode coding, if all image areas are determined CG image areas, the theoretical maximum code amount becomes the same size as the original image. Thus, the provided code data memory capacity becomes the same size as the original image.
For example, assuming that the maximum size of the image to be coded is A3 and that the image is YMCK 600 dpi, the data amount of the original image becomes 288 Mbytes, thus the code data memory capacity needs also be provided 288 Mbytes. Installation of such large-capacity memory is impractical from costs and therefore the demand for reducing the memory capacity occurs.
In the ADCT coding, an image is divided into blocks, DCT (Discrete Cosine Transform) is executed for each block, the DCT coefficients are quantized, and the quantized DCT coefficients are Huffman coded. The Huffman coding at the last stage is variable-length coding and the ADCT coding is irreversible variable-length coding. That is, as with the above-described reversible coding, the coding ratio changes in response to the image to be coded and the minimum coding ratio becomes 1/1 in the ADCT coding.
Thus, as with the reversible coding, the code data memory capacity needs to be provided as the same size as the original image, and large-capacity code memory needs to be installed.
It is therefore an object of the invention to provide an image coding system, an image decoding system, an image processing system, an image coding method, an image decoding method, and an image processing method capable of performing efficient coding if the image contains mixed areas greatly different in image characteristic, such as CG image and natural image areas, and making it possible to provide a high-quality image with minimized image quality degradation of the decompressed image if a small code data memory capacity is available.
To the end, according to the invention, there is provided an image coding system comprising block division means for dividing an input image into blocks each containing a plurality of pixels, image characteristic determination means for determining the characteristic of an image in each of the blocks provided by the block division means, variable-length coding means for performing variable-length coding for the input image, fixed-length coding means for performing fixed-length coding for the input image, and control means for selecting either of the variable-length coding means and the fixed-length coding means based on the determination result of the image characteristic determination means and controlling the selected coding means so as to execute coding for the input image.
In the described image coding system, first the block division means divides an input image into blocks each containing a plurality of pixels, for example, image blocks each consisting of eight X eight pixels. Each block image is fed into the image characteristic determination means, which then analyzes the image characteristic of the block image and determines the optimum decoding technique for decoding the block image. The control means selects the coding means adopting the optimum coding technique, the variable-length coding means or the fixed-length coding means, and controls the selected coding means so as to code the block image. Preferably, identification information indicating the coding technique used for the coding is added to the code data and the code data to which the identification information is added is output.
According to the invention, there is provided an image decoding system for decoding code data output from the image coding system, the image decoding system comprising extraction means for extracting the identification information indicating a coding technique from the code data, variable-length decoding means for performing variable-length decoding of the code data from which the identification information is extracted, fixed-length decoding means for performing fixed-length decoding of the code data from which the identification information is extracted, and control means for selecting either of the variable-length decoding means and the fixed-length decoding means based on the identification information extracted by the extraction means and controlling the selected decoding means so as to execute decoding for the code data from which the identification information is extracted.
In the described image decoding system, first the extraction means extracts the identification information specifying the coding technique used for the coding from the code data output from the image coding system. The control means selects the variable-length decoding means or the fixed-length decoding means adopting the decoding technique corresponding to the extracted identification information and controls the selected decoding means so as to execute decoding for the code data.
According to the invention, there is provided an image processing system comprising the described image coding system and the described image decoding system. In the image processing system, the image coding system divides an input image into blocks, determines the image characteristic for each block, executes coding for the input image using variable-length coding or fixed-length coding based on the determination result, adds identification information indicating the used coding type, and outputs code data to which the identification information is added, and the image decoding system extracts the identification information from the code data output from the image coding system, selects the variable-length decoding or fixed-length decoding corresponding to the extracted identification information, and decodes the code data from which the identification information is extracted.
According to the invention, there is provided an image coding method comprising the steps of dividing an input image into blocks each containing a plurality of pixels, determining the characteristic of an image in each block, and selecting either of variable-length coding and fixed-length coding based on the determination result and executing the selected coding for the input image. Preferably, the identification information indicating the used coding type of variable-length coding or fixed-length coding is added to the code data coded using either of the variable-length coding and the fixed-length coding.
According to the invention, there is provided an image decoding method comprising the steps of extracting the identification information from the code data coded by the image coding method, selecting either of the variable-length decoding and the fixed-length decoding based on the extracted identification information, and executing decoding for the code data from which the identification information is extracted.
According to the invention, there is provided an image processing method comprising the steps of dividing an input image into blocks each containing a plurality of pixels, determining the characteristic of an image in each block, selecting either of variable-length coding and fixed-length coding based on the determination result, executing the selected coding for the input image, adding identification information indicating the selected coding type of variable-length coding or fixed-length coding, outputting the code data to which the identification information is added, extracting the identification information from the code data, selecting either of the variable-length decoding and the fixed-length decoding based on the extracted identification information, and executing decoding for the code data from which the identification information is extracted.